//
//  MZMuseumViewController.m
//  minzuwenhuagong
//
//  Created by WANG CUNRUI on 14-5-23.
//  Copyright (c) 2014年 WANG CUNRUI. All rights reserved.
//

#import "MZMuseumViewController.h"

@implementation MZMuseumViewController
{
    NSMutableArray *titleArray;
    NSMutableArray *pointArray;
}

//@synthesize allTableView = _allTableView;
//@synthesize allCountLable = _allCountLable;
//@synthesize yourPointLable = _yourPointLable;
@synthesize backView = _backView;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}



//- (void)viewWillAppear:(BOOL)animated
//{
//    [super viewWillAppear:YES];
//}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    self.edgesForExtendedLayout = UIRectEdgeNone;
    self.view.backgroundColor = [UIColor colorWithRed:0.9373 green:0.9216 blue:0.9059 alpha:1.0];
    CGRect frame = self.view.bounds;
    CGSize f = frame.size;
    CGFloat h = f.height;
//    CGFloat w = f.width;
    NSLog(@"%f",f.height);
    
//    _backView = [[UIView alloc] init];
//    _backView.frame = CGRectMake(0, 0, 320, 30);
//    _backView.backgroundColor = [UIColor colorWithRed:0/255.0 green:75/255.0 blue:48/255.0 alpha:1.0];
//    [self.view addSubview:_backView];
    
//    _allCountLable = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 150, 10)];
//    _allCountLable.font = [UIFont systemFontOfSize:13];
//    _allCountLable.text = @"文物类别";
//    _allCountLable.textColor = [UIColor whiteColor];
//    [_backView addSubview:_allCountLable];
    
    UIImageView *Image1 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"xxx.png"]];
    Image1.frame = CGRectMake(40, 0.078*h, 80,80);
    [self.view addSubview:Image1];
    UIImageView *Image2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mianju.png"]];
    Image2.frame = CGRectMake(200, 0.078*h, 80,80);
    [self.view addSubview:Image2];
    UIImageView *Image3 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"jingshu.png"]];
    Image3.frame = CGRectMake(40, 0.3*h, 80,80);
    [self.view addSubview:Image3];
    UIImageView *Image4 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"fushi1.png"]];
    Image4.frame = CGRectMake(200, 0.3*h, 80,80);
    [self.view addSubview:Image4];
    UIImageView *Image5 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"tangka.png"]];
    Image5.frame = CGRectMake(40, 0.53*h, 80,80);
    [self.view addSubview:Image5];
    UIImageView *Image6 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"shuhua.png"]];
    Image6.frame = CGRectMake(200, 0.53*h, 80,80);
    [self.view addSubview:Image6];
    
    _label1 = [[UILabel alloc] initWithFrame:CGRectMake(30, 0.26*h, 100, 10)];
    _label1.font = [UIFont systemFontOfSize:12];
    _label1.text = @"镇馆之宝";
    _label1.textColor = [UIColor blackColor];
    _label1.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:_label1];
    _label2 = [[UILabel alloc] initWithFrame:CGRectMake(190, 0.26*h, 100, 10)];
    _label2.font = [UIFont systemFontOfSize:12];
    _label2.text = @"民族面具";
    _label2.textColor = [UIColor blackColor];
    _label2.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:_label2];
    _label3 = [[UILabel alloc] initWithFrame:CGRectMake(30, 0.48*h, 100, 10)];
    _label3.font = [UIFont systemFontOfSize:12];
    _label3.text = @"典藏文献";
    _label3.textColor = [UIColor blackColor];
    _label3.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:_label3];
    _label4 = [[UILabel alloc] initWithFrame:CGRectMake(190, 0.48*h, 100, 10)];
    _label4.font = [UIFont systemFontOfSize:12];
    _label4.text = @"民俗服饰";
    _label4.textColor = [UIColor blackColor];
    _label4.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:_label4];
    _label5 = [[UILabel alloc] initWithFrame:CGRectMake(30, 0.715*h, 100, 10)];
    _label5.font = [UIFont systemFontOfSize:12];
    _label5.text = @"唐卡艺术";
    _label5.textColor = [UIColor blackColor];
    _label5.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:_label5];
    _label6 = [[UILabel alloc] initWithFrame:CGRectMake(190, 0.715*h, 100, 10)];
    _label6.font = [UIFont systemFontOfSize:12];
    _label6.text = @"传世书画";
    _label6.textColor = [UIColor blackColor];
    _label6.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:_label6];
    
    _button1 = [UIButton buttonWithType:UIButtonTypeCustom];
    _button1.frame = CGRectMake(30, 0.078*h, 100, 90);
    [_button1 setBackgroundColor:[UIColor clearColor]];
    [_button1 addTarget:self action:@selector(butClick1:) forControlEvents:UIControlEventTouchUpInside];
    _button1.tag = 1;
    [self.view addSubview:_button1];
    _button2 = [UIButton buttonWithType:UIButtonTypeCustom];
    _button2.frame = CGRectMake(190, 0.078*h, 100, 90);
    [_button2 setBackgroundColor:[UIColor clearColor]];
    [_button2 addTarget:self action:@selector(butClick2:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:_button2];
    _button3 = [UIButton buttonWithType:UIButtonTypeCustom];
    _button3.frame = CGRectMake(30, 0.3*h, 100, 90);
    [_button3 setBackgroundColor:[UIColor clearColor]];
    [_button3 addTarget:self action:@selector(butClick3:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:_button3];
    _button4 = [UIButton buttonWithType:UIButtonTypeCustom];
    _button4.frame = CGRectMake(190, 0.3*h, 100, 90);
    [_button4 setBackgroundColor:[UIColor clearColor]];
    [_button4 addTarget:self action:@selector(butClick4:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:_button4];
    _button5 = [UIButton buttonWithType:UIButtonTypeCustom];
    _button5.frame = CGRectMake(30, 0.53*h, 100, 90);
    [_button5 setBackgroundColor:[UIColor clearColor]];
    [_button5 addTarget:self action:@selector(butClick5:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:_button5];
    _button6 = [UIButton buttonWithType:UIButtonTypeCustom];
    _button6.frame = CGRectMake(190, 0.53*h, 100, 90);
    [_button6 setBackgroundColor:[UIColor clearColor]];
    [_button6 addTarget:self action:@selector(butClick6:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:_button6];
    UIBarButtonItem *rightBBI = [[UIBarButtonItem alloc] initWithTitle:@"搜索" style:UIBarButtonItemStylePlain target:self action:@selector(bbiClick:)];
    rightBBI.tag = 1;
    self.navigationItem.rightBarButtonItem = rightBBI;

}

- (void)checkBoxBigButClick
{
    
    [[NSNotificationCenter defaultCenter] postNotificationName:@"touchUIInsideSaoYiSao" object:nil];
}

- (void)butClick1:(UIButton *)but
{
    _ZhenguanController = [[ZhenguanController alloc] init];
    [self.navigationController pushViewController:_ZhenguanController animated:YES];
    //[self makeAlertView];
}

- (void)butClick2:(UIButton *)but
{
    _MianJuController = [[MianJuController alloc] init];
    [self.navigationController pushViewController:_MianJuController animated:YES];
    //[self makeAlertView];
}

- (void)butClick3:(UIButton *)but
{
    _WenXianController = [[WenXianController alloc] init];
    [self.navigationController pushViewController:_WenXianController animated:YES];
    //[self makeAlertView];
}
- (void)butClick5:(UIButton *)but
{
    _TangKaController = [[TangKaController alloc] init];
    [self.navigationController pushViewController:_TangKaController animated:YES];
    //[self makeAlertView];
}
- (void)butClick6:(UIButton *)but
{
    _ShuHuaController = [[ShuHuaController alloc] init];
    [self.navigationController pushViewController:_ShuHuaController animated:YES];
    //[self makeAlertView];
}
- (void)butClick4:(UIButton *)but
{
    _FuShiController = [[FuShiController alloc] init];
    [self.navigationController pushViewController:_FuShiController animated:YES];
    //[self makeAlertView];
}

- (void)bbiClick:(UIButton *)bbi
{
    _SearchViewController = [[SearchViewController alloc] init];
    [self.navigationController pushViewController:_SearchViewController animated:YES];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
